//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if compiler(>=5.5.2) && canImport(_Concurrency)

import SotoCore

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension PrivateNetworks {
    // MARK: Async API Calls

    /// Acknowledges that the specified network order was received.
    public func acknowledgeOrderReceipt(_ input: AcknowledgeOrderReceiptRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> AcknowledgeOrderReceiptResponse {
        return try await self.client.execute(operation: "AcknowledgeOrderReceipt", path: "/v1/orders/acknowledge", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Activates the specified device identifier.
    public func activateDeviceIdentifier(_ input: ActivateDeviceIdentifierRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ActivateDeviceIdentifierResponse {
        return try await self.client.execute(operation: "ActivateDeviceIdentifier", path: "/v1/device-identifiers/activate", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Activates the specified network site.
    public func activateNetworkSite(_ input: ActivateNetworkSiteRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ActivateNetworkSiteResponse {
        return try await self.client.execute(operation: "ActivateNetworkSite", path: "/v1/network-sites/activate", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Configures the specified network resource.    Use this action to specify the geographic position of the hardware. You must provide Certified Professional Installer (CPI) credentials in the request so that we can obtain spectrum grants. For more information, see Radio units in the Amazon Web Services Private 5G User Guide.
    public func configureAccessPoint(_ input: ConfigureAccessPointRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ConfigureAccessPointResponse {
        return try await self.client.execute(operation: "ConfigureAccessPoint", path: "/v1/network-resources/configure", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Creates a network.
    public func createNetwork(_ input: CreateNetworkRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> CreateNetworkResponse {
        return try await self.client.execute(operation: "CreateNetwork", path: "/v1/networks", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Creates a network site.
    public func createNetworkSite(_ input: CreateNetworkSiteRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> CreateNetworkSiteResponse {
        return try await self.client.execute(operation: "CreateNetworkSite", path: "/v1/network-sites", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Deactivates the specified device identifier.
    public func deactivateDeviceIdentifier(_ input: DeactivateDeviceIdentifierRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> DeactivateDeviceIdentifierResponse {
        return try await self.client.execute(operation: "DeactivateDeviceIdentifier", path: "/v1/device-identifiers/deactivate", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Deletes the specified network. You must delete network sites before you delete the network. For more information, see  DeleteNetworkSite in the  API Reference for Amazon Web Services Private 5G.
    public func deleteNetwork(_ input: DeleteNetworkRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> DeleteNetworkResponse {
        return try await self.client.execute(operation: "DeleteNetwork", path: "/v1/networks/{networkArn}", httpMethod: .DELETE, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Deletes the specified network site. Return the hardware after you delete the network site. You are responsible for minimum charges. For more information, see Hardware returns in the Amazon Web Services Private 5G User Guide.
    public func deleteNetworkSite(_ input: DeleteNetworkSiteRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> DeleteNetworkSiteResponse {
        return try await self.client.execute(operation: "DeleteNetworkSite", path: "/v1/network-sites/{networkSiteArn}", httpMethod: .DELETE, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Gets the specified device identifier.
    public func getDeviceIdentifier(_ input: GetDeviceIdentifierRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> GetDeviceIdentifierResponse {
        return try await self.client.execute(operation: "GetDeviceIdentifier", path: "/v1/device-identifiers/{deviceIdentifierArn}", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Gets the specified network.
    public func getNetwork(_ input: GetNetworkRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> GetNetworkResponse {
        return try await self.client.execute(operation: "GetNetwork", path: "/v1/networks/{networkArn}", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Gets the specified network resource.
    public func getNetworkResource(_ input: GetNetworkResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> GetNetworkResourceResponse {
        return try await self.client.execute(operation: "GetNetworkResource", path: "/v1/network-resources/{networkResourceArn}", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Gets the specified network site.
    public func getNetworkSite(_ input: GetNetworkSiteRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> GetNetworkSiteResponse {
        return try await self.client.execute(operation: "GetNetworkSite", path: "/v1/network-sites/{networkSiteArn}", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Gets the specified order.
    public func getOrder(_ input: GetOrderRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> GetOrderResponse {
        return try await self.client.execute(operation: "GetOrder", path: "/v1/orders/{orderArn}", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Lists device identifiers. Add filters to your request to return a more  specific list of results. Use filters to match the Amazon Resource Name (ARN) of an order,  the status of device identifiers, or the ARN of the traffic group.  If you specify multiple filters, filters are joined with an OR, and the request
    /// returns results that match all of the specified filters.
    public func listDeviceIdentifiers(_ input: ListDeviceIdentifiersRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ListDeviceIdentifiersResponse {
        return try await self.client.execute(operation: "ListDeviceIdentifiers", path: "/v1/device-identifiers/list", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Lists network resources.  Add filters to your request to return a more  specific list of results. Use filters to match the Amazon Resource Name (ARN) of an order or   the status of network resources. If you specify multiple filters, filters are joined with an OR, and the request
    /// returns results that match all of the specified filters.
    public func listNetworkResources(_ input: ListNetworkResourcesRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ListNetworkResourcesResponse {
        return try await self.client.execute(operation: "ListNetworkResources", path: "/v1/network-resources", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Lists network sites. Add filters to your request to return a more  specific list of results. Use filters to match the status of the network site.
    public func listNetworkSites(_ input: ListNetworkSitesRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ListNetworkSitesResponse {
        return try await self.client.execute(operation: "ListNetworkSites", path: "/v1/network-sites/list", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Lists networks. Add filters to your request to return a more  specific list of results. Use filters to match the status of the network.
    public func listNetworks(_ input: ListNetworksRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ListNetworksResponse {
        return try await self.client.execute(operation: "ListNetworks", path: "/v1/networks/list", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Lists orders.  Add filters to your request to return a more  specific list of results. Use filters to match the Amazon Resource Name (ARN) of the network site or   the status of the order. If you specify multiple filters, filters are joined with an OR, and the request
    /// returns results that match all of the specified filters.
    public func listOrders(_ input: ListOrdersRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ListOrdersResponse {
        return try await self.client.execute(operation: "ListOrders", path: "/v1/orders/list", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Lists the tags for the specified resource.
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ListTagsForResourceResponse {
        return try await self.client.execute(operation: "ListTagsForResource", path: "/tags/{resourceArn}", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Checks the health of the service.
    public func ping(logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> PingResponse {
        return try await self.client.execute(operation: "Ping", path: "/ping", httpMethod: .GET, serviceConfig: self.config, logger: logger, on: eventLoop)
    }

    ///  Adds tags to the specified resource.
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> TagResourceResponse {
        return try await self.client.execute(operation: "TagResource", path: "/tags/{resourceArn}", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Removes tags from the specified resource.
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> UntagResourceResponse {
        return try await self.client.execute(operation: "UntagResource", path: "/tags/{resourceArn}", httpMethod: .DELETE, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Updates the specified network site.
    public func updateNetworkSite(_ input: UpdateNetworkSiteRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> UpdateNetworkSiteResponse {
        return try await self.client.execute(operation: "UpdateNetworkSite", path: "/v1/network-sites/site", httpMethod: .PUT, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Updates the specified network site plan.
    public func updateNetworkSitePlan(_ input: UpdateNetworkSitePlanRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> UpdateNetworkSiteResponse {
        return try await self.client.execute(operation: "UpdateNetworkSitePlan", path: "/v1/network-sites/plan", httpMethod: .PUT, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension PrivateNetworks {
    ///  Lists device identifiers. Add filters to your request to return a more  specific list of results. Use filters to match the Amazon Resource Name (ARN) of an order,  the status of device identifiers, or the ARN of the traffic group.  If you specify multiple filters, filters are joined with an OR, and the request
    ///  returns results that match all of the specified filters.
    /// Return PaginatorSequence for operation.
    ///
    /// - Parameters:
    ///   - input: Input for request
    ///   - logger: Logger used flot logging
    ///   - eventLoop: EventLoop to run this process on
    public func listDeviceIdentifiersPaginator(
        _ input: ListDeviceIdentifiersRequest,
        logger: Logger = AWSClient.loggingDisabled,
        on eventLoop: EventLoop? = nil
    ) -> AWSClient.PaginatorSequence<ListDeviceIdentifiersRequest, ListDeviceIdentifiersResponse> {
        return .init(
            input: input,
            command: self.listDeviceIdentifiers,
            inputKey: \ListDeviceIdentifiersRequest.startToken,
            outputKey: \ListDeviceIdentifiersResponse.nextToken,
            logger: logger,
            on: eventLoop
        )
    }

    ///  Lists network resources.  Add filters to your request to return a more  specific list of results. Use filters to match the Amazon Resource Name (ARN) of an order or   the status of network resources. If you specify multiple filters, filters are joined with an OR, and the request
    ///  returns results that match all of the specified filters.
    /// Return PaginatorSequence for operation.
    ///
    /// - Parameters:
    ///   - input: Input for request
    ///   - logger: Logger used flot logging
    ///   - eventLoop: EventLoop to run this process on
    public func listNetworkResourcesPaginator(
        _ input: ListNetworkResourcesRequest,
        logger: Logger = AWSClient.loggingDisabled,
        on eventLoop: EventLoop? = nil
    ) -> AWSClient.PaginatorSequence<ListNetworkResourcesRequest, ListNetworkResourcesResponse> {
        return .init(
            input: input,
            command: self.listNetworkResources,
            inputKey: \ListNetworkResourcesRequest.startToken,
            outputKey: \ListNetworkResourcesResponse.nextToken,
            logger: logger,
            on: eventLoop
        )
    }

    ///  Lists network sites. Add filters to your request to return a more  specific list of results. Use filters to match the status of the network site.
    /// Return PaginatorSequence for operation.
    ///
    /// - Parameters:
    ///   - input: Input for request
    ///   - logger: Logger used flot logging
    ///   - eventLoop: EventLoop to run this process on
    public func listNetworkSitesPaginator(
        _ input: ListNetworkSitesRequest,
        logger: Logger = AWSClient.loggingDisabled,
        on eventLoop: EventLoop? = nil
    ) -> AWSClient.PaginatorSequence<ListNetworkSitesRequest, ListNetworkSitesResponse> {
        return .init(
            input: input,
            command: self.listNetworkSites,
            inputKey: \ListNetworkSitesRequest.startToken,
            outputKey: \ListNetworkSitesResponse.nextToken,
            logger: logger,
            on: eventLoop
        )
    }

    ///  Lists networks. Add filters to your request to return a more  specific list of results. Use filters to match the status of the network.
    /// Return PaginatorSequence for operation.
    ///
    /// - Parameters:
    ///   - input: Input for request
    ///   - logger: Logger used flot logging
    ///   - eventLoop: EventLoop to run this process on
    public func listNetworksPaginator(
        _ input: ListNetworksRequest,
        logger: Logger = AWSClient.loggingDisabled,
        on eventLoop: EventLoop? = nil
    ) -> AWSClient.PaginatorSequence<ListNetworksRequest, ListNetworksResponse> {
        return .init(
            input: input,
            command: self.listNetworks,
            inputKey: \ListNetworksRequest.startToken,
            outputKey: \ListNetworksResponse.nextToken,
            logger: logger,
            on: eventLoop
        )
    }

    ///  Lists orders.  Add filters to your request to return a more  specific list of results. Use filters to match the Amazon Resource Name (ARN) of the network site or   the status of the order. If you specify multiple filters, filters are joined with an OR, and the request
    ///  returns results that match all of the specified filters.
    /// Return PaginatorSequence for operation.
    ///
    /// - Parameters:
    ///   - input: Input for request
    ///   - logger: Logger used flot logging
    ///   - eventLoop: EventLoop to run this process on
    public func listOrdersPaginator(
        _ input: ListOrdersRequest,
        logger: Logger = AWSClient.loggingDisabled,
        on eventLoop: EventLoop? = nil
    ) -> AWSClient.PaginatorSequence<ListOrdersRequest, ListOrdersResponse> {
        return .init(
            input: input,
            command: self.listOrders,
            inputKey: \ListOrdersRequest.startToken,
            outputKey: \ListOrdersResponse.nextToken,
            logger: logger,
            on: eventLoop
        )
    }
}

#endif // compiler(>=5.5.2) && canImport(_Concurrency)
